﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Services;

namespace my.abp.Services
{
	[Authorize]
	public class HelloService : ApplicationService
	{
		/// <summary>
		/// 动态Api
		/// </summary>
		/// <param name="name"></param>
		/// <returns></returns>
		[HttpGet("hello-world")]
		public string GetHelloWorld(string? name)
		{
			//会自动添加前缀，而不是重置，更符合习惯
			//如果需要重置以"/"根目录开头即可
			//你好世界
			return name ?? "HelloWord";
		}
	}
}
